/**
 * 权限实体类
 */
package com.cnfangmao.right.entity;

import java.sql.Timestamp;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude.Include;


@JsonInclude(value = Include.NON_EMPTY)
@JsonIgnoreProperties(ignoreUnknown = true)
public class Right {
	private int id;  //主键
	private String cname; //中文名字
	private String ename;  //英文名字
	private String processor; //处理器类
	private String description; //描述
	private Timestamp  createtime;  //创建时间
	
	@JsonProperty("ID")
	public int getId() {
		return id;
	}

	@JsonProperty("ID")
	public void setId(int id) {
		this.id = id;
	}

	@JsonProperty("CName")
	public String getCName() {
		return cname;
	}
	
	@JsonProperty("CName")
	public void setCName(String cname) {
		this.cname = cname;
	}

	@JsonProperty("EName")
	public String getEname() {
		return ename;
	}
	
	@JsonProperty("EName")
	public void setEName(String ename) {
		this.ename = ename;
	}
	
	@JsonProperty("Processor")
	public String getProcessor() {
		return processor;
	}
	
	@JsonProperty("Processor")
	public void setProcessor(String processor) {
		this.processor = processor;
	}

	@JsonProperty("Description")
	public String getDescription() {
		return description;
	}

	@JsonProperty("Description")
	public void setDescription(String description) {
		this.description = description;
	}

	@JsonProperty("CreateTime")
	public Timestamp getCreatetime() {
		return createtime;
	}

	@JsonProperty("CreateTime")
	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((cname == null) ? 0 : cname.hashCode());
		result = prime * result + ((createtime == null) ? 0 : createtime.hashCode());
		result = prime * result + ((description == null) ? 0 : description.hashCode());
		result = prime * result + ((ename == null) ? 0 : ename.hashCode());
		result = prime * result + id;
		result = prime * result + ((processor == null) ? 0 : processor.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Right other = (Right) obj;
		if (cname == null) {
			if (other.cname != null)
				return false;
		} else if (!cname.equals(other.cname))
			return false;
		if (createtime == null) {
			if (other.createtime != null)
				return false;
		} else if (!createtime.equals(other.createtime))
			return false;
		if (description == null) {
			if (other.description != null)
				return false;
		} else if (!description.equals(other.description))
			return false;
		if (ename == null) {
			if (other.ename != null)
				return false;
		} else if (!ename.equals(other.ename))
			return false;
		if (id != other.id)
			return false;
		if (processor == null) {
			if (other.processor != null)
				return false;
		} else if (!processor.equals(other.processor))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Right [id=" + id + ", cname=" + cname + ", ename=" + ename + ", processor=" + processor
				+ ", description=" + description + ", createtime=" + createtime + "]";
	}
	
	
	
}
